package com.peng.spring.scope;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author peng
 * @Date 2024-04-17 9:40
 */
public class TestOrder {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("com.peng.spring.scope");
        Order order1 = context.getBean(Order.class);
        Order order2 = context.getBean(Order.class);
        System.out.println("order1 = " + order1);
        System.out.println("order2 = " + order2);
    }
}

